package com.wufan.day07;

/**
 * @author SongWufan
 * @date 2021/4/4 22:42
 */
public class ManKind {
       private int sex;
       private int salary;

    public ManKind(int sex, int salary) {
        this.sex = sex;
        this.salary = salary;
    }

    public ManKind() {
        super();
    }

    public void manOrWomen() {
           if (sex == 1) {
               System.out.println("man");
           }
           else if (sex == 0) {
               System.out.println("woman");
           }
       }

       public void employed() {
           String jobInfo = (salary == 0) ? "no job" : "job";
           System.out.println(jobInfo);
       }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public int getSalary() {
        return salary;
    }

    public void setSalary(int salary) {
        this.salary = salary;
    }
}
